package test.aop;

import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.EnableAspectJAutoProxy;


/*
 * 
 * 1. 扫描指定类文件 <br>
   @ComponentScan (basePackageClasses = {test.aop.ISay.class} )  <br>
2. 扫描指定包，使用默认扫描规则，即被@Component, @Repository, @Service, @Controller <br>
或者已经声明过@Component自定义注解标记的组件； <br>
   @ComponentScan(value = "com.yibai") <br>
3. 扫描指定包，加载被@Component注解标记的组件和默认规则的扫描（因为useDefaultFilters默认为true） <br>
   @ComponentScan(value = "com.yibai", includeFilters = { @Filter(type = FilterType.ANNOTATION, value = Component.class) }) <br>
4. 扫描指定包，只加载Person类型的组件 <br>
   @ComponentScan(value = "com.yibai", includeFilters = { @Filter(type = FilterType.ASSIGNABLE_TYPE, value = Person.class) }, useDefaultFilters = false) <br>
5. 扫描指定包，过滤掉被@Component标记的组件 <br>
   @ComponentScan(value = "com.yibai", excludeFilters = { @Filter(type = FilterType.ANNOTATION, value = Component.class) }) <br>
6. 扫描指定包，自定义过滤规则 <br>
   @ComponentScan(value = "com.yibai", includeFilters = { @Filter(type = FilterType.CUSTOM, value = ColorBeanLoadFilter.class) }, useDefaultFilters = true) <br>
 */
@Configuration
@ComponentScan(value = "test.aop" )
@EnableAspectJAutoProxy(proxyTargetClass = true)
public class AppConfig {
}